package com.feng.swing.tools.listener;

import java.awt.event.MouseAdapter;

import javax.swing.JButton;
import javax.swing.JPanel;

import com.feng.swing.tools.service.ToolsTabPanelService;
import com.feng.swing.tools.ui.TabPanel;

public class ToolsTabPanelListener extends MouseAdapter{
	ToolsTabPanelService tabSer = new ToolsTabPanelService();
	TabPanel view = null;
	public ToolsTabPanelListener(JPanel panel){
		 view = (TabPanel)panel;
	}
	public void mouseClicked(java.awt.event.MouseEvent evt) {
		JButton b = (JButton)evt.getSource();
		System.out.println(">>>Name:"+b.getName());
		if(b.getName().equals(view.toSignBtn.getName()))
			tabSer.toSignBtnGetSign(view);
		else if(b.getName().equals(view.toSignBtn.getName()))
			tabSer.checkSign(view);
		else if(b.getName().equals(view.base64DecodeBtn.getName()))
			tabSer.base64DecodeBtnbase64Decode(view);
		else if(b.getName().equals(view.base64EncodeBtn.getName()))
			tabSer.base64EncodeBtnbase64Encode(view);
		else if(b.getName().equals(view.urlDecodeBtn.getName()))
			tabSer.urlDecode(view);
		else if(b.getName().equals(view.urlEncodeBtn.getName()))
			tabSer.urlEncode(view);
		
	}
}
